from django.contrib import admin
from django.urls import path
from django.urls import re_path
from django.urls import include
from django.views.static import serve
from django.conf import settings
# xadmin的依赖
import xadmin
from xadmin.plugins import xversion

xadmin.autodiscover()
xversion.register_models()

urlpatterns = [
    path('xadmin/', xadmin.site.urls),
    path('admin/', admin.site.urls),
    path('home/', include('home.urls')),
    path('user/', include('user.urls')),
    path('course/', include('course.urls')),

    re_path('media/(?P<path>.*)', serve, {'document_root': settings.MEDIA_ROOT})

]
